package com.qf.weektest.weektest.controller;

import com.qf.weektest.vo.ResultVo;
import com.qf.weektest.weektest.service.IPollinfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.UnsupportedEncodingException;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ljc
 * @since 2023-02-24
 */
@RestController
@RequestMapping("/poll")
public class PollinfController {

    @Autowired
    IPollinfService pollinfService;
    @GetMapping ("/get")
    public ResultVo poll(String telephone,String name,String token) throws UnsupportedEncodingException {


        return pollinfService.poll(telephone, name, token);
    }
    @GetMapping("/count")
    public ResultVo count() throws UnsupportedEncodingException {


        return pollinfService.countN();
    }

}
